#ifndef _PART_DIE_H_
#define _PART_DIE_H_

#include <string>
namespace LuaPlus
{
    class LuaObject;
}

namespace part2d
{
class Part2D;
struct Particle2D;
class	PartDie
{
public:
	static PartDie*		GetPartDie(LuaPlus::LuaObject Obj, Part2D* pBase);
	static PartDie*		GetPartDie(PartDie* pPartDie, Part2D* pBase);
						PartDie(Part2D* pBase, int GroupID, int Probability);
	virtual				~PartDie();
	virtual	void		ParticleDie(Particle2D* pPart);
	virtual std::string	GetName() const { return "part_rebirth"; };
	int					GetGroup() const { return m_GroupID; };
	int					GetProbability() const { return m_Probability; };
protected:
	bool				IsProbable();
	Part2D*				m_pBaseSys;
	int					m_GroupID;
	int					m_Probability;
};

}

#endif // _PART_DIE_H_